from bs4 import BeautifulSoup
import requests


headers = {
    "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0"
}
for i in range(0,250,25):
    response = requests.get(f"https://movie.douban.com/top250?start={i}", headers=headers)
    content1 = response.text
    soup = BeautifulSoup(content1, "html.parser")
    all_title = soup.find_all("span", attrs={"class": "title"})
    for title in all_title:
        title_string = title.string
        if "/" not in title_string:
            print(title.string)



